<%@page import="java.util.List"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <c:forEach items="${session['listaMensagens']}" var="elemento">
            <div class="mensagem">${elemento}</div>
        </c:forEach>
            
            <%
            List<Object> listaMensagens = (List<Object>) session.getAttribute("listaMensagens");
            for(Object o : listaMensagens) {
                out.println("<div class='mensagem'>" + o + "</div>");
            }
            %>
    </body>
</html>
